<?php
/**
 * ccNewsletter
 * @author Chill Creations <info@chillcreations.com>
 * @link http://www.chillcreations.com
 * @license GNU/GPL
**/

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
jimport( 'joomla.application.component.view' );
class ccNewsletterViewsubscriber extends JView
{
	function display($tpl = null)
	{
		// get the subscriber we are giong to view
		$subscriberRecord =& $this->get('Data');
		$isNew= ($subscriberRecord->id < 1);

		$text = $isNew ? JText::_( 'CC_NEW' ) : JText::_( 'CC_EDIT' );
		JToolBarHelper::title(   JText::_( 'CC_SUBSCRIBER_VIEW' ).': <small><small>[ ' . $text.' ]</small></small>' );
		JToolBarHelper::save();
		if ($isNew)  {
			JToolBarHelper::cancel();
		} else {
			JToolBarHelper::cancel( 'cancel', 'Close' );
		}
		$this->assignRef('subscriberRecord',		$subscriberRecord);
		parent::display($tpl);
	}
}